package com.drp.service.impl;

import com.drp.bean.Goods;
import com.drp.bean.Market;
import com.drp.bean.Market2;
import com.drp.dao.MarketMapper;
import com.drp.service.IMarketService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author ren
 * @since 2022-03-16
 */
@Service
public class MarketServiceImpl extends ServiceImpl<MarketMapper, Market> implements IMarketService {
    @Autowired
    private MarketMapper marketMapper;

    @Override
    public List<Market2> selectMarket() {
        return marketMapper.selectMarket();
    }

    @Override
    public boolean insertMarket2(Market2 market2) {
        return marketMapper.insertMarket2(market2)>0;
    }

    @Override
    public List<Goods> selectGoods(String name, String kind) {
        return marketMapper.selectGoods(name,kind);
    }

    @Override
    public boolean updateMarket2(String id,String number) {
        return marketMapper.updateMarket2(id,number)>0;
    }

    @Override
    public boolean updateMarket2byId(String id, String number) {
        return marketMapper.updateMarket2byId(id,number)>0;
    }

    @Override
    public boolean delMarket2ById(String id) {
        return marketMapper.delMarket2ById(id)>0;
    }

    @Override
    public boolean delMarket2() {
        return marketMapper.delMarket2()>0;
    }
}
